package top.continew.admin.req;

import cn.hutool.core.lang.RegexPool;
import jakarta.validation.constraints.*;
import lombok.Data;
import top.continew.admin.system.util.ValidateGroup;

import java.math.BigDecimal;

/**
 * @program: examstar-manger-api
 * @description: 创建内容分销链用户的接口
 * @author: Xiong weiqiang
 * @create: 2025-03-27 11:39
 */
@Data
public class DistributeContentProductRegisterRto {
    @NotBlank(message = "产品ID不能为空",groups = {ValidateGroup.ReqGroup.SAVE.class, ValidateGroup.ReqGroup.UPDATE.class})
    private Long productId;
    @NotBlank(message = "产品名称不能为空",groups = {ValidateGroup.ReqGroup.SAVE.class, ValidateGroup.ReqGroup.UPDATE.class})
    private String productName;
    @NotNull(message = "分成比例不能为空",groups = {ValidateGroup.ReqGroup.SAVE.class, ValidateGroup.ReqGroup.UPDATE.class})
    @DecimalMin(value = "0",message = "分成比例不能小于0",groups = {ValidateGroup.ReqGroup.SAVE.class, ValidateGroup.ReqGroup.UPDATE.class})
    @DecimalMax(value = "40",message = "分成比例不能大于40",groups = {ValidateGroup.ReqGroup.SAVE.class, ValidateGroup.ReqGroup.UPDATE.class})
    private BigDecimal stablePercent;
}